/*
 * Copyright (c) 2016 zhangcm. All Rights Reserved.
 */
package com.jnzc.ocr.serv.system.api.impl;

import com.jnzc.ocr.serv.system.api.SysDictApi;
import com.jnzc.ocr.serv.system.service.SysDictService;
import com.jnzc.ocr.serv.system.vo.DictPair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhangcm
 * @version 1.0, 2017/9/17
 */
@RestController
public class SysDictApiImpl implements SysDictApi {

    @Autowired
    private SysDictService sysDictService;

    @Override
    public DictPair findPair(@RequestParam("code") String code, @RequestParam("pairId") Integer pairId) {
        return sysDictService.findPair(code, pairId);
    }

    @Override
    public List<DictPair> listPair(@RequestParam("code") String code) {
        return sysDictService.listPair(code);
    }
}
